<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>14-将数组中用户状态为0的对象清除</title>
	</head>
	<body>
		<script type="text/javascript">
			var arr = [
				{
					uid:1,
					username:'张学友',
					status:1
				},
				{
					uid:2,
					username:'贾玲',
					status:0
				},
				{
					uid:3,
					username:'宋小宝',
					status:1
				},								
			];
			var newArr=[];
			for(var i=0;i<arr.length;i++){
				if(arr[i].status!=0){
					newArr.push(arr[i]);
				}
			}
			console.log(newArr);
			
			
			
		</script>
	</body>
</html>
